<?php

require_once '../inc/init.php';

$sql = "SELECT total_users,total_players FROM tb_statistics_pay";

$rs = $db->getAll($sql);

$sql = "SELECT server_id,active_users FROM tb_statistics_daily WHERE statis_date = 20120315";
$rs = $db->getAll($sql);

$sql = "SELECT starttime FROM tb_server";
$rs = $db->getAll($sql);

$sql="SELECT reg_users FROM tb_statistics_daily GROUP BY server_id;";

//SELECT COUNT(*) FROM tb_user;
//SELECT COUNT(*) FROM tb_user WHERE player_id != 0;
//
//SELECT COUNT(DISTINCT user_id) FROM tb_user_access_log WHERE server_id = 1 AND DATE(created_date) = 20120315;
//
//SELECT id,`server`,starttime FROM tb_server;
//
//SELECT COUNT(*) FROM tb_user WHERE server_id = 2 AND DATE(registe_date) = 20110930;
//
//SELECT s.id,s.starttime,COUNT(u.user_id) 
//FROM tb_server AS s
//LEFT JOIN tb_user AS u ON u.server_id = s.id
//WHERE DATE(u.registe_date) = s.starttime
//GROUP BY s.id;
//
//SELECT * FROM tb_user WHERE server_id = 2 AND DATE(registe_date) = 20110930;
//SELECT * FROM tb_user_access_log WHERE server_id = 2 AND FROM_UNIXTIME(login_time) = 20110930;
//SELECT * FROM tb_user_access_log WHERE server_id = 2 GROUP BY DATE(created_date);
//
//SELECT date(FROM_UNIXTIME(login_time)) FROM tb_user_access_log LIMIT 10;
